package com.jeecms.wicool.manager.car.impl;




import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeecms.common.hibernate3.Updater;
import com.jeecms.wicool.dao.car.CarImg2Dao;
import com.jeecms.wicool.entity.car.CarImg2;
import com.jeecms.wicool.manager.car.CarImg2Mng;

@Service
@Transactional
public class CarImg2MngImpl implements CarImg2Mng {
	
	private CarImg2Dao dao;
	@Autowired
	public void setDao(CarImg2Dao dao) {
		this.dao = dao;
	}
	
	@Override
	public CarImg2 deleteById(Integer id) {
		CarImg2 bean = dao.deleteById(id);
		return bean;
	}
	@Override
	public CarImg2 update(CarImg2 bean) {
		Updater<CarImg2> updater = new Updater<CarImg2>(bean);
		bean = dao.updateByUpdater(updater);
		return bean;
	}
}